package czopyk.model.analysis.conditions;


public abstract class Condition {

	public final double windowSize;
	public final WindowType windowType;

	public Condition(double windowSize, WindowType windowType) {
		super();
		if (windowType == null) {
			throw new IllegalArgumentException("Window type cannot be null.");
		}
		if (WindowType.LENGTH.equals(windowType) && Math.rint(windowSize) != windowSize) {
			throw new IllegalArgumentException("Length window required integer window size.");
		}
		this.windowSize = windowSize;
		this.windowType = windowType;
	}

	public enum WindowType {
		LENGTH, MODEL_TIME, BATCH_LENGTH
	}
	
	// pokrywają się z nazwami funkcji agregujących z espera!
	public enum StatsType {
		AVERAGE, VARIANCE, STDDEV, DATAPOINTS, THROUGHPUT
	}
}
